// https://iai.sh.cn/problem/24
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int x = (a >= 90);
    int y = (b >= 90);
    int z = (c >= 90);
    int t = (d >= 85);
    if ((x + y + z) * t >= 2)
        cout << "Qualified";
    else
        cout << "Not qualified";
    return 0;
}